Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC-4345 added testable version of home page JSON example #345

Merged
merged 6 commits into from
Oct 9, 2024

Conversation

andy-stark-redis
Copy link
Collaborator

This is part of an effort to get the JSON examples on the "home" page consistent for all the client libraries.

The current code in just added inline in the doc page, so it doesn't get the benefit of being tested in the NRedisStack repo and also doesn't have the usual tabbed code example features (like expanding to see the whole source file, etc). The code in this PR is basically the same as the existing code but with tests added.

@andy-stark-redis andy-stark-redis self-assigned this Oct 7, 2024
@andy-stark-redis andy-stark-redis added the documentation Improvements or additions to documentation label Oct 7, 2024
@andy-stark-redis andy-stark-redis marked this pull request as ready for review October 7, 2024 12:24
using NRedisStack.Search;
using NRedisStack.Search.Aggregation;
using NRedisStack.Search.Literals.Enums;
using NRedisStack.Tests;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would move this into 'HIDE' region.
at first sight i was thinking this should go into 'REMOVE' region, but then i realized
we left some test project related stuff in 'HIDE' regions overall the docs, is it on purpose ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would move this into 'HIDE' region. at first sight i was thinking this should go into 'REMOVE' region, but then i realized we left some test project related stuff in 'HIDE' regions overall the docs, is it on purpose ?

@atakavci Yes, I've done this on purpose for this example. It's actually for this introductory example on the NRedisStack "home" page. The existing example is written to mention everything right from the start (including imports, etc). You are right, though, that in most other examples, we try to focus on just the relevant commands, not the boilerplate.

Copy link
Collaborator

@atakavci atakavci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks

@atakavci atakavci merged commit 73e7a6d into redis:master Oct 9, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants